<%@ page language="java" import="java.util.*" import="com.gxuwz.medical.domain.user.*" import ="com.gxuwz.medical.domain.role.*" pageEncoding="utf-8" %>
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="renderer" content="webkit">
<title></title>
<link rel="stylesheet" href="../../css/pintuer.css">
<link rel="stylesheet" href="../../css/admin.css">
<script src="../../js/jquery-1.4.4.min.js"></script>
<script src="../../js/pintuer.js"></script>
</head>
<body>
<div class="panel admin-panel">
  <div class="panel-head" id="add"><strong><span class="icon-pencil-square-o"></span>添加用户</strong></div>
  <div class="body-content">
    <form method="post" class="form-x" action="add.user">  
      <div class="form-group">
        <div class="label">
          <label>工号：</label>
        </div>
        <div class="field">
          <input type="text" class="input w50" value="" name="userid" data-validate="required:请输入工号" />
	    </div>
      </div>
      
      <div class="form-group">
        <div class="label">
          <label>密码：</label>
        </div>
        <div class="field">
          <input type="text" class="input w50" value="" name="pwd" data-validate="required:请输入密码" />
	    </div>
      </div>
      
      <div class="form-group">
        <div class="label">
          <label>姓名：</label>
        </div>
        <div class="field">
          <input type="text" class="input w50" value="" name="fullName" data-validate="required:请输入姓名" />
	    </div>
      </div>
      <div class="form-group">
      <div class="label">
         <label>分配角色：</label>
      </div>
        <br>
        <%
        Role r = new Role();
        List<Role> list = r.queryAll();
        if(!list.isEmpty()){
    			for(int i=0;i<list.size();i++){
         %>
         
         
         <input type="checkbox" name="roleid" value="<%=list.get(i).getRoleid()%>"/><%=list.get(i).getRoleName() %>
         

         
         <%
         	}
         }
          %>
      
      </div>
      <div class="form-group">
        <div class="label">
          <label></label>
        </div>
        <div class="field">
          <button class="button bg-main icon-check-square-o" type="submit"> 提交</button>
        </div>
      </div>
      
    </form>
  </div>
</div>

</body></html>